package org.ace.tool.impl;

import org.ace.basicdata.model.MonsterBasicData;
import org.ace.basicdata.model.PlayerBasicData;
import org.ace.dao.model.Player;

public class PropertyUtil {
	
	/*
	 * 获取当前等级的最大经验值
	 * */
	public int getExpMax(Player player)
	{
		return player.getLv() * 100;
	}
	
	/*
	 * 获取当前等级的攻击力
	 * */
	public int getAtk(Player player , PlayerBasicData data)
	{
		return player.getAtk()+ player.getLv() * data.getAtkGrow();
	}
	
	/*
	 * 获取当前等级的防御力
	 * */
	public int GetDef(Player player , PlayerBasicData data)
	{
		return player.getDef()+ player.getLv() * data.getDefGrow();
	}
	
	/*
	 * 获取当前等级血量
	 * */
	public int getHp(Player player , PlayerBasicData data)
	{
		return player.getHp()+ player.getLv() * data.getHpGrow();
	}
   
	/*获取怪物攻击力*/
	public static int getMonsterAtk(MonsterBasicData data, int level) {
		
		return data.getAtkBase()+level* data.getAtkGrow();
	}

	public static int getMonsterDef(MonsterBasicData data, int level) {
		
		return data.getDefBase()+level*data.getDefGrow();
	}

	public static int getMonsterHpMax(MonsterBasicData data, int level) {
		
		return data.getHpBase()+level*data.getHpGrow();
	}

	public static int getMonsterKilledExp(MonsterBasicData data, int level) {
		
		return data.getExp()*(level+1);
	}

}
